<template>
  <div class="index">
    <transition name="fade" mode="out-in">
      <router-view></router-view>
    </transition>
    <div class="tabbar">
      <van-tabbar v-model="active">
        <van-tabbar-item icon="home-o" to="/index/home"   >首页</van-tabbar-item>
        <van-tabbar-item icon="hot-sale-o" to="/index/baobao">爆爆团</van-tabbar-item>
        <van-tabbar-item icon="completed" to="/index/order" >订单</van-tabbar-item>
        <van-tabbar-item icon="manager-o" to="/index/mine"  >我的</van-tabbar-item>
      </van-tabbar>
    </div>
  </div>
</template>

<script>
export default {
    data(){
        return{
            active:0
        }

    }
};
</script>

<style lang='scss' scoped>
.tabbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: 10px 0;
  border-top: 1px solid #ccc;
  background-color: #f5f5f5;
}
.fade-enter {
  transform: scale(0) rotate(0deg);
}
.fade-enter-active {
  transition: all 0.5s;
}
.fade-enter-to {
  transform: scale(1) rotate(360deg);
}

.fade-leave {
  transform: scale(1) rotate(360deg);
}
.fade-leave-active {
  transition: all 0.5s;
}
.fade-leave-to {
  transform: scale(0) rotate(0deg);
}
</style>